/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.koller.million.card.frame.player;

import de.koller.million.card.engine.item.ItemSlot;
import de.koller.million.card.engine.player.Equipt;

/**
 *
 * @author User
 */
public class EquiptPanel extends javax.swing.JPanel {

	/**
	 * Creates new form EquiptPanel
	 */
	public EquiptPanel() {
		initComponents();
	}

	public void updateView( Equipt e ) {
		amulet.setItem( e.get( ItemSlot.Amulet ) );
		chest.setItem( e.get( ItemSlot.Chest ) );
		feet.setItem( e.get( ItemSlot.Feet ) );
		hand.setItem( e.get( ItemSlot.Hand ) );
		head.setItem( e.get( ItemSlot.Head ) );
		leg.setItem( e.get( ItemSlot.Leg ) );
		neck.setItem( e.get( ItemSlot.Neck ) );
		offhand.setItem( e.get( ItemSlot.Offhand ) );
		relikt.setItem( e.get( ItemSlot.Relikt ) );
		ring.setItem( e.get( ItemSlot.Ring ) );
		shoulder.setItem( e.get( ItemSlot.Shoulder ) );
		waist.setItem( e.get( ItemSlot.Waist ) );
		weapon.setItem( e.get( ItemSlot.Weapon ) );
		wrist.setItem( e.get( ItemSlot.Wrist ) );
	}
	
	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	@SuppressWarnings( "unchecked" )
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        head = new de.koller.million.card.frame.item.ItemSlotPanel();
        chest = new de.koller.million.card.frame.item.ItemSlotPanel();
        shoulder = new de.koller.million.card.frame.item.ItemSlotPanel();
        neck = new de.koller.million.card.frame.item.ItemSlotPanel();
        wrist = new de.koller.million.card.frame.item.ItemSlotPanel();
        waist = new de.koller.million.card.frame.item.ItemSlotPanel();
        hand = new de.koller.million.card.frame.item.ItemSlotPanel();
        ring = new de.koller.million.card.frame.item.ItemSlotPanel();
        leg = new de.koller.million.card.frame.item.ItemSlotPanel();
        feet = new de.koller.million.card.frame.item.ItemSlotPanel();
        weapon = new de.koller.million.card.frame.item.ItemSlotPanel();
        offhand = new de.koller.million.card.frame.item.ItemSlotPanel();
        amulet = new de.koller.million.card.frame.item.ItemSlotPanel();
        relikt = new de.koller.million.card.frame.item.ItemSlotPanel();

        setBorder(javax.swing.BorderFactory.createTitledBorder("Equipt"));

        javax.swing.GroupLayout headLayout = new javax.swing.GroupLayout(head);
        head.setLayout(headLayout);
        headLayout.setHorizontalGroup(
            headLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        headLayout.setVerticalGroup(
            headLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout chestLayout = new javax.swing.GroupLayout(chest);
        chest.setLayout(chestLayout);
        chestLayout.setHorizontalGroup(
            chestLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        chestLayout.setVerticalGroup(
            chestLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout shoulderLayout = new javax.swing.GroupLayout(shoulder);
        shoulder.setLayout(shoulderLayout);
        shoulderLayout.setHorizontalGroup(
            shoulderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        shoulderLayout.setVerticalGroup(
            shoulderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout neckLayout = new javax.swing.GroupLayout(neck);
        neck.setLayout(neckLayout);
        neckLayout.setHorizontalGroup(
            neckLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        neckLayout.setVerticalGroup(
            neckLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout wristLayout = new javax.swing.GroupLayout(wrist);
        wrist.setLayout(wristLayout);
        wristLayout.setHorizontalGroup(
            wristLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        wristLayout.setVerticalGroup(
            wristLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout waistLayout = new javax.swing.GroupLayout(waist);
        waist.setLayout(waistLayout);
        waistLayout.setHorizontalGroup(
            waistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        waistLayout.setVerticalGroup(
            waistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout handLayout = new javax.swing.GroupLayout(hand);
        hand.setLayout(handLayout);
        handLayout.setHorizontalGroup(
            handLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        handLayout.setVerticalGroup(
            handLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout ringLayout = new javax.swing.GroupLayout(ring);
        ring.setLayout(ringLayout);
        ringLayout.setHorizontalGroup(
            ringLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        ringLayout.setVerticalGroup(
            ringLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout legLayout = new javax.swing.GroupLayout(leg);
        leg.setLayout(legLayout);
        legLayout.setHorizontalGroup(
            legLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        legLayout.setVerticalGroup(
            legLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout feetLayout = new javax.swing.GroupLayout(feet);
        feet.setLayout(feetLayout);
        feetLayout.setHorizontalGroup(
            feetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        feetLayout.setVerticalGroup(
            feetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout weaponLayout = new javax.swing.GroupLayout(weapon);
        weapon.setLayout(weaponLayout);
        weaponLayout.setHorizontalGroup(
            weaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        weaponLayout.setVerticalGroup(
            weaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout offhandLayout = new javax.swing.GroupLayout(offhand);
        offhand.setLayout(offhandLayout);
        offhandLayout.setHorizontalGroup(
            offhandLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        offhandLayout.setVerticalGroup(
            offhandLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout amuletLayout = new javax.swing.GroupLayout(amulet);
        amulet.setLayout(amuletLayout);
        amuletLayout.setHorizontalGroup(
            amuletLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        amuletLayout.setVerticalGroup(
            amuletLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout reliktLayout = new javax.swing.GroupLayout(relikt);
        relikt.setLayout(reliktLayout);
        reliktLayout.setHorizontalGroup(
            reliktLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );
        reliktLayout.setVerticalGroup(
            reliktLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addComponent(head, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(shoulder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(neck, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(amulet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(wrist, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(chest, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(ring, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(hand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(waist, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(relikt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addComponent(leg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(weapon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(feet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(offhand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(head, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(shoulder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(neck, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(amulet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(5, 5, 5)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(wrist, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(chest, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ring, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(5, 5, 5)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(hand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(waist, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(relikt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(5, 5, 5)
                .addComponent(leg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(weapon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(feet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(offhand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private de.koller.million.card.frame.item.ItemSlotPanel amulet;
    private de.koller.million.card.frame.item.ItemSlotPanel chest;
    private de.koller.million.card.frame.item.ItemSlotPanel feet;
    private de.koller.million.card.frame.item.ItemSlotPanel hand;
    private de.koller.million.card.frame.item.ItemSlotPanel head;
    private de.koller.million.card.frame.item.ItemSlotPanel leg;
    private de.koller.million.card.frame.item.ItemSlotPanel neck;
    private de.koller.million.card.frame.item.ItemSlotPanel offhand;
    private de.koller.million.card.frame.item.ItemSlotPanel relikt;
    private de.koller.million.card.frame.item.ItemSlotPanel ring;
    private de.koller.million.card.frame.item.ItemSlotPanel shoulder;
    private de.koller.million.card.frame.item.ItemSlotPanel waist;
    private de.koller.million.card.frame.item.ItemSlotPanel weapon;
    private de.koller.million.card.frame.item.ItemSlotPanel wrist;
    // End of variables declaration//GEN-END:variables
}
